﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GaiHu.aspx.cs" Inherits="Web.Pages.YongShui.YongHuGL.GaiHu" Theme="Default" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<%@ Register src="../../../../Control/UCAlert.ascx" tagname="UCAlert" tagprefix="uc1" %>
<%@ Register src="../../../../Control/UCConfirm.ascx" tagname="UCConfirm" tagprefix="uc2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../JS/jquery.js"></script>
    <script type="text/javascript">
        function keyEnter(index) {
            var controls = new Array();
            controls[0] = document.getElementById("txtMINGCHENG_I");
            controls[1] = document.getElementById("ddlGUANLIK_I");
            controls[2] = document.getElementById("ddlSUOSHUSF_I");
            controls[3] = document.getElementById("txtWENJIANMMGZ_I");
            var key = event.keyCode;
            if (key == 13) {
                index = index + 1;
                if (index == controls.length) {
                    index = 0;
                }
                controls[index].focus();
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

        <div class="tabletitle1" align="center">
            改户
        </div>

      <div style="width: 99.8%;">
        <div style="width: 95%; margin: 0 auto;padding-left: 10px;">
             
            <div style="padding-left: 30px;">
                <asp:UpdatePanel runat="server" ID="upSearch" UpdateMode="Conditional">
                    <ContentTemplate>
                <table>
                    <tr>
                        <td>
                            用户号：
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="txtYongHuH" runat="server" Width="170px">
                                            </dx:ASPxTextBox>
                        </td>
                        <td>
                            &nbsp;&nbsp;&nbsp;&nbsp;来函编号：&nbsp;
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="txtLaiHanBH" runat="server" Width="170px"></dx:ASPxTextBox>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnSearch" runat="server" Text="查找" UseSubmitBehavior="false" OnClick="btnSearch_Click"  >
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
                         </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <div style=" height: 85%;">
                <fieldset style="border: 1px solid  cornflowerblue">
                    <legend style="font-weight: bold">用户信息</legend>
                    <asp:UpdatePanel runat="server" ID="upEdit" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:Panel ID="panEdit" runat="server">
                    <table style="width:100%">
                        <tr>
                            <td style="text-align:right;width:20%;">
                                新用户号：
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="txtNewYongHuH" runat="server" Width="180px">
                                                <ValidationSettings ValidationGroup="group">
                                                    <RegularExpression ErrorText="应为7位数字类型!" ValidationExpression="^\d{7}$" />
                                                    <RequiredField ErrorText="不能为空!" IsRequired="True" />
                                                    <ErrorFrameStyle ForeColor="Green" CssClass="TestErrorView">
                                                    </ErrorFrameStyle>
                                                </ValidationSettings>
                                                <ClientSideEvents KeyPress="function(s,e){keyEnter(0);}" />
                                            </dx:ASPxTextBox>
                            </td>
                            <td style="width:20%">
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                用户名：
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="txtYONGHUM" runat="server" Width="180px">
                                                 <ValidationSettings ValidationGroup="group">
                                                                <RequiredField ErrorText="不能为空!" IsRequired="True" />
                                                                <ErrorFrameStyle ForeColor="Green" CssClass="TestErrorView">
                                                                </ErrorFrameStyle>
                                                            </ValidationSettings>
                                            </dx:ASPxTextBox>
                            </td>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                用户地址：
                            </td>
                            <td colspan="3">
                                <dx:ASPxTextBox ID="txtYongHuDZ" runat="server" Width="500px">
                                                 <ValidationSettings ValidationGroup="group">
                                                                <RequiredField ErrorText="不能为空!" IsRequired="True" />
                                                                <ErrorFrameStyle ForeColor="Green" CssClass="TestErrorView">
                                                                </ErrorFrameStyle>
                                                            </ValidationSettings>
                                            </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                局号：
                            </td>
                            <td>
                               <dx:ASPxComboBox ID="cmbJu" runat="server" ValueType="System.String" Width="180" AutoPostBack="true" OnSelectedIndexChanged="cmbJu_SelectedIndexChanged"></dx:ASPxComboBox>
                            </td>
                            <td style="text-align:right;">
                                行政区：
                            </td>
                            <td>
                                 <dx:ASPxComboBox ID="cmbXingZhengQ" runat="server" ValueType="System.String" Width="180"></dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                公司号：
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="cmbGongSi" runat="server" Width="180" AutoPostBack="True"></dx:ASPxComboBox>
                            </td>
                            <td style="text-align:right;">
                                业务员：
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="cmbYeWuY" runat="server" ValueType="System.String" Width="180"></dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                联系人：
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="txtLianXiR" runat="server" Width="180"></dx:ASPxTextBox>
                            </td>
                            <td style="text-align:right;">
                                联系电话：
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="txtLianXiDH" runat="server" Width="180"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                联系部门：
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="txtLianXiBM" runat="server" Width="180"></dx:ASPxTextBox>
                            </td>
                            <td style="text-align:right;">
                                邮编：
                            </td>
                            <td>
                               <dx:ASPxTextBox ID="txtYouBian" runat="server" Width="180">
                                                 <ValidationSettings ValidationGroup="group">
                                                                <RequiredField ErrorText="不能为空!" IsRequired="True" />
                                                                <ErrorFrameStyle ForeColor="Green" CssClass="TestErrorView">
                                                                </ErrorFrameStyle>
                                                            </ValidationSettings>
                                            </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                用水性质：
                            </td>
                            <td>
                               <dx:ASPxComboBox ID="cmbYongShuiXZ" runat="server" ValueType="System.String" Width="100"></dx:ASPxComboBox>
                            </td>
                            <td style="text-align:right;">
                                行业类型：
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="cmbSheShuiDXDM" runat="server" ValueType="System.String" Width="180"></dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                用水价：
                            </td>
                            <td>
                               <dx:ASPxTextBox ID="txtYSJ" runat="server" Width="100">
                                                            <ValidationSettings ValidationGroup="group">
                                                                <RegularExpression ErrorText="请输入正确的格式[0.00]!" ValidationExpression="^[0-9]+(.[0-9]{2})?$" />
                                                                <RequiredField ErrorText="不能为空!" IsRequired="True" />
                                                                <ErrorFrameStyle ForeColor="Green" CssClass="TestErrorView">
                                                                </ErrorFrameStyle>
                                                            </ValidationSettings>
                                                            <ClientSideEvents KeyPress="function(s,e){keyEnter(0);}" />
                                                        </dx:ASPxTextBox>
                            </td>
                            <td style="text-align:right;">
                                考核复用：
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="cmbKaoHeFY" runat="server" ValueType="System.String" Width="180"></dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                开户户名：
                            </td>
                            <td colspan="3">
                                <dx:ASPxTextBox ID="txtKaiHuHM" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                开户银行：
                            </td>
                            <td colspan="3">
                               <dx:ASPxTextBox ID="txtKaiHuYH" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                               银行账号：
                            </td>
                            <td colspan="3">
                               <table style="width: 100%">
                                                <tr>
                                                    <td style="width: 70%">
                                                       <dx:ASPxTextBox ID="txtYHZH" runat="server" Width="100%">
                                                            <ValidationSettings ValidationGroup="group">
                                                                <RegularExpression ErrorText="应为数字类型!" ValidationExpression="^[0-9]*$" />
                                                                <ErrorFrameStyle ForeColor="Green" CssClass="TestErrorView">
                                                                </ErrorFrameStyle>
                                                            </ValidationSettings>
                                                            <ClientSideEvents KeyUp="function(s,e){keyEnter(0);
                                                        var strlen=document.getElementById('txtYHZH_I').value.length;
                                                        var strTip;
                                                        if(strlen==0)
                                                        {
                                                            strTip='';
                                                        }
                                                        else
                                                        {
                                                            strTip='长度:'+strlen;
                                                        }
                                                         document.getElementById('lblTipYHZH').innerText=strTip;
                                                         }" />
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxCheckBox ID="cbTuoShou" runat="server" Text="托收">
                                                            <ClientSideEvents CheckedChanged="function(s,e){
                                                                //debugger;
                                                                if(s.previousValue)
                                                                {
                                                                    var yhm=document.getElementById('txtYONGHUM_I').value;
                                                                    document.getElementById('txtKaiHuHM_I').value=yhm;
                                                                }
                                                                }" />
                                                        </dx:ASPxCheckBox>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxLabel ID="lblTipYHZH" runat="server" ForeColor="Red" Text=""></dx:ASPxLabel>
                                                    </td>
                                                </tr>
                                            </table>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:right;">
                                合同号：
                            </td>
                            <td colspan="3">
                                <dx:ASPxTextBox ID="txtHeTongH" runat="server" Width="100%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                    </table>
                            </asp:Panel>
                        </ContentTemplate>
                </asp:UpdatePanel>
                </fieldset>
            </div>
                      <asp:UpdatePanel runat="server" ID="upBtns" UpdateMode="Conditional">
                    <ContentTemplate>   
           <div style="text-align: right">
                <hr />
               
                        <dx:ASPxButton ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" UseSubmitBehavior="false" Visible="true">
                            <ClientSideEvents Click="function(s, e) {
	                                               if (ASPxClientEdit.ValidateGroup('group')) {                 
                                                                   e.processOnServer = true;             
                                                                } 
                                                                else 
                                                                { 
                                                                   e.processOnServer = false; 
                                                                }
                                                    }" />
                        </dx:ASPxButton>
                        <dx:ASPxButton ID="btnCancel" runat="server" Text="放弃" OnClick="btnCancel_Click" UseSubmitBehavior="false" Visible="true">
                        </dx:ASPxButton>                        
                        <dx:ASPxButton ID="btnSheZhiJH" runat="server" Text="设置计划" UseSubmitBehavior="false" Width="80" Visible="true">
                        </dx:ASPxButton>      
            </div>
            <uc1:UCAlert ID="UCAlert1" runat="server" />
            <uc2:UCConfirm ID="UCConfirm1" runat="server" />
            </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </div>



    </form>
</body>
</html>






